<li class="note_type">
	<div class="handle" width='100%' style="background-color: grey;">
	<% fields_for "ticket_template[note_type_attr][]", note_type do |f| %>
	<% if note_type.new_record? %>
        <%= link_to_function image_tag('remove.jpeg'), "$(this).up('.note_type').remove()" %>
      <% else %>
        <%= link_to_function image_tag('remove.jpeg'), "mark_for_destroy(this)" %>
      <% end %></div>
<br />
	
	
	    
   
      Name: <%= f.text_field 'name',  :index => nil %> <br />
     Vtype:

	<%= '<select id="ticket_template_note_type_attr__vtype" name="ticket_template[note_type_attr][][vtype]" onchange="show_or_hide_select_text(this)">'%>
       <%= options_for_select  NoteType.types, ( (note_type.vtype && note_type.vtype != "")? note_type.vtype   : "vstring")%>
</select><br />
	  <% if note_type.vtype == 'vselect' %>
			    <%= f.text_area("select_text", :size => "30x5", :class => 'select_text', :index => nil) %>
	  <% else %>
	            <%= f.text_area("select_text", :size => "30x5", :class => 'select_text', :index => nil, :style=>" display:none;") %>
	  <% end %>
	 <%= f.hidden_field :col_number, :index => nil %>
     <%= f.hidden_field :priority, :index => nil %>
     <% if !note_type.new_record? %>
        <%= f.hidden_field :id, :index => nil %>
        <%= f.hidden_field :should_destroy, :index => nil, :class => 'should_destroy' %>
     <%end%> <br />
     Default value:  <%= f.text_field 'default_value',  :index => nil %>
  <% end %>
</li>
